import ConstDes from './ConstDes'
import * as actions from '../../redux/actions/SecondInstanceAction'
import { StoreState } from '../../redux/Types'
import { Dispatch } from 'redux'
import { connect } from 'react-redux'


export function mapStateToProps({ secondInstance: { record }, global: { sample } }: StoreState) {
  return {
    record,
    sample
  }
}
export function mapDispatchToProps(dispatch: Dispatch<actions.SecondInstanceAction>) {
  return {
    recordDetail: (id: any) => {
      dispatch(actions.recordDetail({ sampleId: id }))
    },
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(ConstDes)